<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="../common/jspcommon.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>订单详细 - 爽客网</title>
<%@include file="../common/js.jsp" %>
<%@include file="../common/css.jsp" %>
<link href="/css/detail.css" type="text/css" rel="stylesheet" />
</head>
<body>
	<%@include file="../common/header.jsp" %>
    <div class="wrap">
    	<div class="w980 mg mt5">
            <div class="d_order_box">
            	<div class="title">订单信息</div>
                <!-- detail-->
                <div class="detail">
                	 <p><span>订单号：<i>${order.id}</i></span><span>订单状态：<i><c:if test="${order.status=='01'}">待支付</c:if> 
										<c:if test="${order.status=='02'}">已支付</c:if> 
										<c:if test="${order.status=='03'}">已成功</c:if> 
										<c:if test="${order.status=='04'}">已完成</c:if> 
										<c:if test="${order.status=='05'}">已取消</c:if></i></span><c:if test="${order.status=='01' && order.payFrom=='01'}"><a href="orderView.htm?id=${order.id}" class="pay_btn">立即付款</a></c:if></p>
                     <p><span>下单时间：<i><fmt:formatDate value="${order.gmtCreated }" pattern="yyyy-MM-dd HH:mm:ss"/></i></span></p>
                     <p><span>支付方式：<i> <c:if test="${order.payFrom=='01'}">线上支付</c:if>	
		                                <c:if test="${order.payFrom=='02'}">到付</c:if></i></span></p>
                     <p><span>包含产品：</span></p>
                     <table class="order_show">
                     	<thead>
                        	<tr>
                            	<th width="270" class="col1">名称</th>
                                <th width="90">门市价</th>
                                <th width="100">现售价</th>
                                <th width="100">购买数量</th>
                                <th>小计</th>
                            </tr>
                        </thead>
                        <tbody>
                        	<c:set var="mpriceAll" value="0"></c:set>
                        	<c:set var="npriceAll" value="0"></c:set>
                        	<c:forEach items="${order.opList}" var="op">
	                        	<tr>
	                            	<td>
	                                	<div class="pl10 pr10"><a <c:choose>
			                                	<c:when test="${order.type=='01'}">
			                                		 href="ticket.htm?id=${op.pid}"
			                                	</c:when>
			                                	<c:when test="${order.type=='02'}">
			                                		 href="hotel.htm?id=${op.pid}"
			                                	</c:when>
			                                	<c:when test="${order.type=='03'}">
			                                		 href="product.htm?id=${op.pid}"
			                                	</c:when>
			                                </c:choose> class="name" target="_blank">${op.pname}</a></div>
	                                </td>
	                                <td><span class="lt">￥${op.mprice }</span></td>
	                                <td><span class="clrred">￥${op.nprice }</span></td>
	                                <td>X ${op.amount}</td>
	                               	<td><span class="clrred">￥${op.nprice * op.amount}</span></td>
	                            </tr>
	                            <c:set var="mpriceAll" value="${mpriceAll+(op.mprice * op.amount)}"></c:set>
	                            <c:set var="npriceAll" value="${npriceAll+(op.nprice * op.amount)}"></c:set>
                        	</c:forEach>
                        		
                        </tbody>
                     </table>
                </div>
                <!-- detail--end-->
                
                <!-- price -->
                <div class="d_else_info clearfix">
                	<p class="tr">
                    	<span>门市价：<i class="lt">￥${mpriceAll}</i></span>|<span>共节省：<i class=" clrred fb">￥${mpriceAll - npriceAll}</i></span>|<span class="f14 fb">订单结算总额：<i class="clrred fb">￥${order.totalFee}</i></span>
                    </p>
                    <div class="contact_info">
                    	<h1>联系人信息</h1>
                        <p><span>联系人姓名：</span><i>${order.contactor}</i></p>
                        <p><span>联系人手机：</span><i>${order.phone}</i></p>
                        <p><span>订单备注：</span><i>${order.memo}</i></p>
                    </div>
                </div>
                <!-- price--end-->
            </div>
        </div>
    </div>
    <%@include file="../common/footer.jsp" %>
</body>
</html>
